﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework5._10
{
    class Program
    {
        static void Main(string[] args)
        {
            double[] numbers = new double[10];
            for (int i = 0; i < 10; i++)
            {
                Console.Write($"请输入第{i + 1}个数字：");
                numbers[i] = Convert.ToDouble(Console.ReadLine());
            }
            double temp;
            for (int i = 0; i < 9; i++)
            {
                for (int j = 0; j < 9-i; j++)
                {
                    if (numbers[j+1]< numbers[j])
                    {
                        temp = numbers[j+1];
                        numbers[j + 1] = numbers[j];
                        numbers[j] = temp;
                    }
                }
            }
            Console.Write("升序排序后的数组为:");
            foreach (double item in numbers)
            {
                Console.Write(item +" ");
            }
            Console.ReadKey();
        }
    }
}
